perm filename DEMO.VLI[VLI,LSP] blob
sn#379954 filedate 1978-09-08 generic text, type C, neo UTF8
COMMENT ā VALID 00002 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002 (de init ()
C00006 ENDMK
Cā;
(de init ()
(setq xpos 5 ypos 20)
; essay output ;
(ppiot 0 \400002)
(ppiot 2 409)
(ppiot 3 (plus (times 15 \1000) 1))
; pour lisp ;
(ppiot 0 1)
(ppiot 2 -305)
(ppiot 3 (plus (times 3 \1000) 1))
; activer ;
(ppiot 1 \300000)
;silence ;
(status 2 0 2)
(displ 'l)
(setq xpos 5 ypos 20))))))))
(de ttys (x y s ind)
; s = chaine de car ;
; x = ligne, y = colonne ;
; ind = blink or not ;
(setq -y (append [\177 \14 (logxor \140 y)(logxor \140 x)]
(mapcar (maklist s) 'cascii)))
(upgiot () (if ind (append [\177 \17] -y) -y))))))))))
(de impwith (-x)
(setqa l (li i j) -x)
(ttys 6 15 (reverstr (string1 [i j])))
(cancel)
(ttys (+ xpos i)(+ ypos (sub1 (* 2 j))) (string (ascii -x)))))))
)))))))
(de displ (a y)
(maparray a (lambda (-x )
(setq y (cons '/ (cons (pp a -x) y)))
(cond
((zerop (rem (add1 -x) nj))
(ttys (incr xpos) ypos (string1 y))
(setq y ())))))))))))))
(de string1 (x y)(mapc (mapcar x 'string)
(lambda (x)(setq y (concat x (string y)))))
y)))))
(de cancel ()(upgiot () [\177 \30]))))
(DE TTYCLEAR ()
; efface tout l'ecran ;
(DISPLAY [\177 \36]))
(DE TTYBOLDS (X Y S)
; edite une chaine en BOLD face (i.e. en clignottant) ;
; en position X ligne y colonne ;
(DISPLAY
(APPEND [\177 \17 \177 \14 (LOGXOR \140 Y) (LOGXOR \140 X)]
(MAPCAR (MAKLIST S) 'CASCII)
[\177 \30])))
(DE TTYBLINKS (X Y S)
; edite une chaine en BLINK i.e. en double brillance ;
; en position X ligne Y colonne ;
(DISPLAY
(APPEND [\177 \16 \177 \14 (LOGXOR \140 Y) (LOGXOR \140 X)]
(MAPCAR (MAKLIST S) 'CASCII))))
(DE TTYCURSOR (X Y)
; positionne le curseur en X et Y ;
(PPIOT 8 (+ (STATUS 42 1)
(LOC (LOGOR (LOGSHIFT X 18) Y)))))))))
(DE TTYROLLON ()
; reactive le ROLL-ON ;
(DISPLAY [\177 \35]))
(DE TTYROLLOF ()
; deactive le ROLL ;
(DISPLAY [\177 \30])))
(DE TTYNBIN ()
; lecture sur la TTY d'un nb ;
(WHILE (OR (LZP (SETQ N (- (TYI) \60)))
(GT N 9)))
(WHILE (GE \71 (SETQ char (TYI)) \60)
(SETQ N (+ (* N 10) (- char \60))))
N))